from django.urls import converters
class UsernameConverter:
    regex = '[A-Za-z0-9-_]{5,20}'

    def to_python(self, value):
        return value

class MobileConverter:
    regex='1[3-9]\d{9}'
    def to_python(self,value):
        return value #int(value) 看需求



